﻿@using VirtualPress.Infrastructure.Entities.Enum;
@using VirtualPress.Infrastructure.Entities.Entity;
@{
    Meeting meeting = ViewBag.Meeting;
    ViewBag.Title = "编委成员 —— " + meeting.Name;
    Layout = "/Areas/WorkSpace/Views/Shared/_WorkSpace.cshtml";
}
@section head{
    <link rel="stylesheet" href="/content/css/uniform.css" />
}
<div id="content-header">
    <h1>
        编委成员</h1>
</div>
<div id="breadcrumb">
    <a href="/WorkSpace/meeting/index" class="tip-bottom"><i class="icon-home"></i>起始页</a> <a href="/WorkSpace/Console/Counsellor">
        人员管理</a> <a href="javascript:" class="current">编委会</a>
</div>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <ul class="nav nav-tabs" style="float:left;">
                        <li class="active"><a href="javascript:;">编委会成员</a> </li>
                        <li><a href="/workspace/meeting/InvitePending">待确认</a></li>
                    </ul>
                    <div class="buttons">
                        <a href="/WorkSpace/meeting/InviteCounsellor@{Html.Raw(String.IsNullOrEmpty(Request.QueryString["meeting"]) ? "" : "?meeting=" + Request.QueryString["meeting"]);}" class="btn btn-success btn-mini">
                            <i class="icon-plus icon-white"></i>新增管委会成员</a>
                    </div>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered">
                        <thead>
                            <tr style="cursor: pointer;">
                                <th style="width: 10%">
                                    姓名
                                </th>
                                <th style="width: 10%">
                                    称谓
                                </th>
                                <th style="width: 25%">
                                    机构单位
                                </th>
                                <th style="width: 10%">
                                    所在城市
                                </th>
                                <th style="width: 10%">
                                    学位
                                </th>
                                <th style="width: 10%">
                                    行业
                                </th>
                                <th style="width: 15%">
                                    联系电话
                                </th>
                                <th style="width: 10%">
                                    操作
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            @{ItemListBox<Organization> data = ViewBag.Editorial;
                              List<Organization> list = data.Data;}
                            @foreach (var item in list)
                            { 
                                <tr>
                                    <td style="text-align: center">
                                        @item.user.NickName @item.user.Gender.Mapping()
                                    </td>
                                    <td style="text-align: center">
                                        @item.expert.Title
                                    </td>
                                    <td style="text-align: center">
                                        @item.expert.Institution
                                    </td>
                                    <td style="text-align: center">
                                        @item.user.Area.Mapping()
                                    </td>
                                    <td style="text-align: center">
                                        @item.expert.Degree
                                    </td>
                                    <td style="text-align: center">
                                        @item.user.Profession.Mapping()
                                    </td>
                                    <td style="text-align: center">
                                        @item.user.Phone
                                    </td>
                                    <td style="text-align: center">
                                        <a href="javascript:;" onclick="CancelExpert('@item.user.UserName')" class="btn btn-danger btn-mini">
                                            删除</a>
                                    </td>
                                </tr>
                            }
                        </tbody>
                    </table>
                </div>
                @Html.Raw(data.PageItemSegment)
            </div>
        </div>
    </div>
</div>
@section tail{
    <script type="text/javascript" src="/scripts/jquery.uniform.js"></script>
    <script type="text/javascript" src="/scripts/select2.min.js"></script>
    <script type="text/javascript" src="/scripts/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="/scripts/unicorn.tables.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#likorganization').addClass('open active');
        });
        function CancelExpert(username) {
            if (confirm('您确认要移除这位编委会成员吗？')) {
                window.location.href = '/workspace/meeting/CacnelEditorial?meeting=@Request.QueryString["meeting"]&u=' + username;
            }
        }
    </script>
}
